.class public Lcom/evernote/thrift/protocol/TProtocolUtil;
.super Ljava/lang/Object;
.source "TProtocolUtil.java"


# static fields
.field private static maxSkipDepth:I


# direct methods
.method static constructor <clinit>()V
    .registers 1

    .prologue
    .line 35
    const v0, 0x7fffffff

    sput v0, Lcom/evernote/thrift/protocol/TProtocolUtil;->maxSkipDepth:I

    return-void
.end method

.method public constructor <init>()V
    .registers 1

    .prologue
    .line 29
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method

.method public static setMaxSkipDepth(I)V
    .registers 1
    .param p0, "depth"    # I

    .prologue
    .line 49
    sput p0, Lcom/evernote/thrift/protocol/TProtocolUtil;->maxSkipDepth:I

    .line 50
    return-void
.end method

.method public static skip(Lcom/evernote/thrift/protocol/TProtocol;B)V
    .registers 3
    .param p0, "prot"    # Lcom/evernote/thrift/protocol/TProtocol;
    .param p1, "type"    # B
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Lcom/evernote/thrift/TException;
        }
    .end annotation

    .prologue
    .line 60
    sget v0, Lcom/evernote/thrift/protocol/TProtocolUtil;->maxSkipDepth:I

    invoke-static {p0, p1, v0}, Lcom/evernote/thrift/protocol/TProtocolUtil;->skip(Lcom/evernote/thrift/protocol/TProtocol;BI)V

    .line 61
    return-void
.end method

.method public static skip(Lcom/evernote/thrift/protocol/TProtocol;BI)V
    .registers 10
    .param p0, "prot"    # Lcom/evernote/thrift/protocol/TProtocol;
    .param p1, "type"    # B
    .param p2, "maxDepth"    # I
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Lcom/evernote/thrift/TException;
        }
    .end annotation

    .prologue
    .line 73
    if-gtz p2, :cond_a

    .line 74
    new-instance v5, Lcom/evernote/thrift/TException;

    const-string v6, "Maximum skip depth exceeded"

    invoke-direct {v5, v6}, Lcom/evernote/thrift/TException;-><init>(Ljava/lang/String;)V

    throw v5

    .line 76
    :cond_a
    packed-switch p1, :pswitch_data_92

    .line 157
    :goto_d
    :pswitch_d
    return-void

    .line 79
    :pswitch_e
    invoke-virtual {p0}, Lcom/evernote/thrift/protocol/TProtocol;->readBool()Z

    goto :goto_d

    .line 84
    :pswitch_12
    invoke-virtual {p0}, Lcom/evernote/thrift/protocol/TProtocol;->readByte()B

    goto :goto_d

    .line 89
    :pswitch_16
    invoke-virtual {p0}, Lcom/evernote/thrift/protocol/TProtocol;->readI16()S

    goto :goto_d

    .line 94
    :pswitch_1a
    invoke-virtual {p0}, Lcom/evernote/thrift/protocol/TProtocol;->readI32()I

    goto :goto_d

    .line 99
    :pswitch_1e
    invoke-virtual {p0}, Lcom/evernote/thrift/protocol/TProtocol;->readI64()J

    goto :goto_d

    .line 104
    :pswitch_22
    invoke-virtual {p0}, Lcom/evernote/thrift/protocol/TProtocol;->readDouble()D

    goto :goto_d

    .line 109
    :pswitch_26
    invoke-virtual {p0}, Lcom/evernote/thrift/protocol/TProtocol;->readBinary()Ljava/nio/ByteBuffer;

    goto :goto_d

    .line 114
    :pswitch_2a
    invoke-virtual {p0}, Lcom/evernote/thrift/protocol/TProtocol;->readStructBegin()Lcom/evernote/thrift/protocol/TStruct;

    .line 116
    :goto_2d
    invoke-virtual {p0}, Lcom/evernote/thrift/protocol/TProtocol;->readFieldBegin()Lcom/evernote/thrift/protocol/TField;

    move-result-object v0

    .line 117
    .local v0, "field":Lcom/evernote/thrift/protocol/TField;
    iget-byte v5, v0, Lcom/evernote/thrift/protocol/TField;->type:B

    if-nez v5, :cond_39

    .line 123
    invoke-virtual {p0}, Lcom/evernote/thrift/protocol/TProtocol;->readStructEnd()V

    goto :goto_d

    .line 120
    :cond_39
    iget-byte v5, v0, Lcom/evernote/thrift/protocol/TField;->type:B

    add-int/lit8 v6, p2, -0x1

    invoke-static {p0, v5, v6}, Lcom/evernote/thrift/protocol/TProtocolUtil;->skip(Lcom/evernote/thrift/protocol/TProtocol;BI)V

    .line 121
    invoke-virtual {p0}, Lcom/evernote/thrift/protocol/TProtocol;->readFieldEnd()V

    goto :goto_2d

    .line 128
    .end local v0    # "field":Lcom/evernote/thrift/protocol/TField;
    :pswitch_44
    invoke-virtual {p0}, Lcom/evernote/thrift/protocol/TProtocol;->readMapBegin()Lcom/evernote/thrift/protocol/TMap;

    move-result-object v3

    .line 129
    .local v3, "map":Lcom/evernote/thrift/protocol/TMap;
    const/4 v1, 0x0

    .local v1, "i":I
    :goto_49
    iget v5, v3, Lcom/evernote/thrift/protocol/TMap;->size:I

    if-ge v1, v5, :cond_5e

    .line 130
    iget-byte v5, v3, Lcom/evernote/thrift/protocol/TMap;->keyType:B

    add-int/lit8 v6, p2, -0x1

    invoke-static {p0, v5, v6}, Lcom/evernote/thrift/protocol/TProtocolUtil;->skip(Lcom/evernote/thrift/protocol/TProtocol;BI)V

    .line 131
    iget-byte v5, v3, Lcom/evernote/thrift/protocol/TMap;->valueType:B

    add-int/lit8 v6, p2, -0x1

    invoke-static {p0, v5, v6}, Lcom/evernote/thrift/protocol/TProtocolUtil;->skip(Lcom/evernote/thrift/protocol/TProtocol;BI)V

    .line 129
    add-int/lit8 v1, v1, 0x1

    goto :goto_49

    .line 133
    :cond_5e
    invoke-virtual {p0}, Lcom/evernote/thrift/protocol/TProtocol;->readMapEnd()V

    goto :goto_d

    .line 138
    .end local v1    # "i":I
    .end local v3    # "map":Lcom/evernote/thrift/protocol/TMap;
    :pswitch_62
    invoke-virtual {p0}, Lcom/evernote/thrift/protocol/TProtocol;->readSetBegin()Lcom/evernote/thrift/protocol/TSet;

    move-result-object v4

    .line 139
    .local v4, "set":Lcom/evernote/thrift/protocol/TSet;
    const/4 v1, 0x0

    .restart local v1    # "i":I
    :goto_67
    iget v5, v4, Lcom/evernote/thrift/protocol/TSet;->size:I

    if-ge v1, v5, :cond_75

    .line 140
    iget-byte v5, v4, Lcom/evernote/thrift/protocol/TSet;->elemType:B

    add-int/lit8 v6, p2, -0x1

    invoke-static {p0, v5, v6}, Lcom/evernote/thrift/protocol/TProtocolUtil;->skip(Lcom/evernote/thrift/protocol/TProtocol;BI)V

    .line 139
    add-int/lit8 v1, v1, 0x1

    goto :goto_67

    .line 142
    :cond_75
    invoke-virtual {p0}, Lcom/evernote/thrift/protocol/TProtocol;->readSetEnd()V

    goto :goto_d

    .line 147
    .end local v1    # "i":I
    .end local v4    # "set":Lcom/evernote/thrift/protocol/TSet;
    :pswitch_79
    invoke-virtual {p0}, Lcom/evernote/thrift/protocol/TProtocol;->readListBegin()Lcom/evernote/thrift/protocol/TList;

    move-result-object v2

    .line 148
    .local v2, "list":Lcom/evernote/thrift/protocol/TList;
    const/4 v1, 0x0

    .restart local v1    # "i":I
    :goto_7e
    iget v5, v2, Lcom/evernote/thrift/protocol/TList;->size:I

    if-ge v1, v5, :cond_8c

    .line 149
    iget-byte v5, v2, Lcom/evernote/thrift/protocol/TList;->elemType:B

    add-int/lit8 v6, p2, -0x1

    invoke-static {p0, v5, v6}, Lcom/evernote/thrift/protocol/TProtocolUtil;->skip(Lcom/evernote/thrift/protocol/TProtocol;BI)V

    .line 148
    add-int/lit8 v1, v1, 0x1

    goto :goto_7e

    .line 151
    :cond_8c
    invoke-virtual {p0}, Lcom/evernote/thrift/protocol/TProtocol;->readListEnd()V

    goto/16 :goto_d

    .line 76
    nop

    :pswitch_data_92
    .packed-switch 0x2
        :pswitch_e
        :pswitch_12
        :pswitch_22
        :pswitch_d
        :pswitch_16
        :pswitch_d
        :pswitch_1a
        :pswitch_d
        :pswitch_1e
        :pswitch_26
        :pswitch_2a
        :pswitch_44
        :pswitch_62
        :pswitch_79
    .end packed-switch
.end method
